﻿@model StudMap.Core.Information.NodeInformation
@{
    Layout = null;
}

<h3>Knoteninformationen</h3>
<div class="table">
    <div class="tableCell">
        <div class="tableRow"><b>DisplayName:</b></div>
        <div class="tableRow"><input id="inputDisplayName" type="text" value="@Model.DisplayName" class="contextInputField"/></div>
    </div>
    <div class="tableCell">
        <div class="tableRow"><b>RoomName:</b></div>
        <div class="tableRow"><input id="inputRoomName" type="text" value="@Model.RoomName" class="contextInputField"/></div>
    </div> 
    <div class="tableCell">
        <div class="tableRow"><b>QR-Code:</b></div>
        <div class="tableRow"><input type="text" id="inputQRCode" value="@(Model.QRCode)" class="contextInputField"/></div>
    </div>
    <div class="tableCell">
        <div class="tableRow"><b>NFC Tag:</b></div>
        <div class="tableRow"><input type="text" id="inputNFCTag" value="@Model.NFCTag" class="contextInputField"/></div>
    </div>   
    <div class="tableCell">
        <div class="tableRow"><b>PoI Typ:</b></div>
        @{
            IEnumerable<SelectListItem> selectList = ViewBag.PoiTypes;
        }
        <div class="tableRow">
            <select id="inputPoiTypeId" name="PoI.Type">
                @foreach (SelectListItem item in selectList)
                {
                    <option @(item.Selected ? "selected=selected" : "") value="@item.Value">@item.Text</option>
                }
            </select>
        </div>
    </div>            
    <div class="tableCell">
        <div class="tableRow"><b>PoI Beschreibung:</b></div>
        <div class="tableRow"><textarea id="inputPoI" cols="17" rows="4" class="contextInputField">@Model.PoI.Description</textarea></div>
    </div>
</div>
@if (Model.Node != null)
{
    <div id="node">
        <h3>Knoten</h3>
        <div class="table" >
            <div class="tableCell">
                <div class="tableRow"><b>Knoten Id:</b></div>
                <div class="tableRow" id="nodeId">@Model.Node.Id</div>
            </div>
            <div class="tableCell">
                <div class="tableRow"><b>X-Koord. (Prozent):</b></div>
                <div class="tableRow">@(Model.Node.X*100)%</div>
            </div>
            <div class="tableCell">
                <div class="tableRow"><b>Y-Koord. (Prozent):</b></div>
                <div class="tableRow">@(Model.Node.Y*100)%</div>
            </div>
            <div class="tableCell">
                <div class="tableRow"><b>Floor-ID:</b></div>
                <div class="tableRow">@Model.Node.FloorId</div>
            </div>
        </div>
    </div>
}